package com.cd.works.domain;

import java.io.IOException;

public class TestTcpSms {
	public static void sendSMS(){
		try {
            String host = "localhost";
            int port = 9500;
            String username = "admin";
            String password = "abc123";

            MyOzSmsClient osc = new MyOzSmsClient(host, port);
            osc.login(username, password);

            
            String line = "Hello World";

            System.out.println("SMS message:");

            if(osc.isLoggedIn()) {
                    osc.sendMessage("+919916699466", line);
                    osc.logout();
            }


    } catch (IOException e) {
            System.out.println(e.toString());
            e.printStackTrace();
    } catch (InterruptedException e) {
            System.out.println(e.toString());
            e.printStackTrace();
    }
	}
}
